#pragma once
#include "PlatTypeUtil.h"
#include <processthreadsapi.h>
#include <assert.h>

__forceinline bool IsValidTlsSlot(uint32 slotIndex)
{
	return slotIndex != 0xFFFFFFFF;
}

__forceinline uint32 GetTlsSlot()
{
	uint32 tlsSlot = ::TlsAlloc();
	assert(IsValidTlsSlot(tlsSlot));
	return tlsSlot;
}
